<%= form_with(model: myblog) do |form| %>
  <% if myblog.errors.any? %>
    <div style="color: red">
      <h2><%= pluralize(myblog.errors.count, "error") %> prohibited this myblog from being saved:</h2>

      <ul>
        <% myblog.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div>
    <%= form.label :title, style: "display: block" %>
    <%= form.text_field :title %>
  </div>

  <div>
    <%= form.label :content, style: "display: block" %>
    <%= form.text_area :content %>
  </div>

  <div>
    <%= form.submit %>
  </div>
<% end %>
